package map_set.nowcoder.easy;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * @author bruin_du
 * @description 数据库连接池
 * https://www.nowcoder.com/questionTerminal/05f97d9b29944c018578d98d7f0ce56e
 * @date 2022/6/28 18:47
 **/
public class DatabaseConnectionPool {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNext()) {
            Set<String> set = new HashSet<>();
            int size = 0;
            int n = in.nextInt();
            for (int i = 0; i < n; i++) {
                String str = in.next();
                in.nextLine();
                if(set.contains(str)) {
                    set.remove(str);
                }else {
                    set.add(str);
                }
                size = Math.max(size,set.size());
            }
            System.out.println(size);
        }
    }
}
